<template>
  <div>
    <el-dialog title="人才查看" :visible.sync="dialogVisible" width="60%" :before-close="handleClose">
      <div class="detailsTip">人才具体信息</div>
      <el-form
        :inline="true"
        :model="menuForm"
        class="demo-form-inline modi-icon"
        label-position="right"
        label-width="100px"
      >
        <el-form-item v-if="menuForm.kind!==null" label="姓名" :required="true" class="name">
          <el-input v-model="menuForm.username" placeholder></el-input>
        </el-form-item>
        <el-form-item v-if="menuForm.kind==0" label="电话" :required="true" class="phone">
          <el-input v-model="menuForm.phone" placeholder></el-input>
        </el-form-item>
        <el-form-item v-if="menuForm.kind==0" label="学历" :required="true">
          <el-input v-model="menuForm.edu" placeholder></el-input>
        </el-form-item>
        <el-form-item v-if="menuForm.kind==0" label="工作年限" :required="true">
          <el-input v-model="menuForm.jobTime" placeholder></el-input>
        </el-form-item>
        <el-form-item v-if="menuForm.kind==0" label="竞聘岗位" :required="true" class="time">
          <el-input v-model="menuForm.jobName" placeholder></el-input>
        </el-form-item>
        <el-form-item v-if="menuForm.kind==1" label="引荐岗位" :required="true">
          <el-input v-model="menuForm.jobName" placeholder></el-input>
        </el-form-item>
        <el-form-item v-if="menuForm.kind==1" label="引荐时间" :required="true" class="time">
          <el-input v-model="menuForm.time" placeholder></el-input>
        </el-form-item>
        <el-form-item label="简历下载" :required="true">
          <el-button type="primary" @click="upload()">下载</el-button>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="close">返回</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: ["val", "menuForm"],
  data() {
    return {
      dialogVisible: false
    };
  },
  methods: {
    upload() {
      console.log(this.menuForm);
      window.open(this.menuForm.attachmentAddress);
    },
    handleClose(done) {
      this.$parent.dialogVisible = false;
      done();
    },
    onSubmit() {},
    close() {
      this.dialogVisible = false;
      this.$emit("getMessage", this.dialogVisible);
    }
  },
  watch: {
    val(newVal) {
      this.dialogVisible = newVal;
    }
  }
};
</script>

<style lang="less" scoped>
.el-dialog__body {
  padding: 10px 0 6px 0px;
  border-top: 1px solid #cccccc;
}
.detailsTip {
  padding-left: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid #cccccc;
  margin-bottom: 20px;
  color: #4787e4ff;
}
.demo-form-inline {
  padding-left: 60px;
}
/deep/.el-dialog__footer {
  text-align: center !important;
}

.modi-icon .el-form-item__label:before {
  color: blue !important;
  margin-right: 25px !important;
}

.time .el-form-item__label:before {
  margin-right: 0px !important;
}
.compete-post .el-form-item__label:before {
  margin-right: 25px !important;
}
.phone .el-form-item__label:before {
  margin-right: 53px !important;
}
</style>




